﻿namespace ScrumLite.Services.Contracts
{
    using System;
    using System.Runtime.Serialization;
    using System.Collections.ObjectModel;

    [DataContract]
    public class Project
    {
        [DataMember]
        public Guid Id { get; set; }

        [DataMember]
        public string Name { get; set; }

        [DataMember]
        public string RepositoryUri { get; set; }

        [DataMember]
        public string Group { get; set; }

        [DataMember]
        public DateTime StartsOn { get; set; }

        [DataMember]
        public DateTime? EndsOn { get; set; }

        [DataMember]
        public string ProjectSpecificMetricsUri { get; set; }
    }
    
    [DataContract]
    public class CheckStatus
    {
        public CheckStatus()
            : this(new Collection<string>())
        {
        }

        public CheckStatus(Collection<string> errors)
        {
            this.Errors = errors;
        }

        [DataMember]
        public string PropertyChecked { get; set; }

        [DataMember]
        public bool Status { get; set; }
        
        [DataMember]
        public Collection<string> Errors { get; private set; }
    }
}
